package com.xmy.cultivate.service;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.xmy.cultivate.entity.Grade;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xmy.cultivate.entity.Staff;
import com.xmy.cultivate.entity.response.MathChaPlan;
import com.xmy.cultivate.entity.response.YearAndQuarter;
import com.xmy.cultivate.entity.views.LeadDataRs;
import com.xmy.cultivate.respons.ResSchool;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 班级 服务类
 * </p>
 *
 * @author min
 * @since 2022-07-26
 */
public interface IGradeService extends IService<Grade> {
    public abstract boolean saveTo(Grade grade);

    public abstract boolean updateTo(Grade grade);

    public IPage<Grade> checkGrade(IPage<?> page, Wrapper wrapper,Long schoolId);
    //public abstract List<Map<String,Object>> checkGrade(Map<String,Object> map);

    public abstract IPage<Grade> findAll(IPage<?> page,Wrapper wrapper);

    public abstract Grade getOneForId(Long id);

    public abstract List<Grade> getGradeForCheck(Long schoolId,Long courseId);

    public abstract Boolean addStudent(String gradeId,String[] studentIdList);

    public abstract Boolean endOfShift(Long gradeId);

    IPage<Staff> getGradeTeacher(IPage<?> page,
                                 Integer yearPart,
                                 Integer quarterNum,
                                 String schoolId,
                                 String subjectsId,
                                 String yearClassId,
                                 String classTypeId,
                                 String name
    );

    public abstract List<MathChaPlan> getSchoolTimeList(
            Integer yearPart,
            Integer quarterNum,
            String readingType,
            String isBeforQuarter,
            String studentIdStr
    );

    String getYearClassIdForTeacherId(Integer yearPart, Integer quarterNum, Long teacherId);
}
